using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class NPD_NoteConfigMap : EntityTypeConfiguration<NPD_NoteConfig>
    {
        public NPD_NoteConfigMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Caption)
                .HasMaxLength(100);

            this.Property(t => t.RecordType)
                .HasMaxLength(30);

            // Table & Column Mappings
            this.ToTable("NPD_NoteConfig");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Caption).HasColumnName("Caption");
            this.Property(t => t.RecordType).HasColumnName("RecordType");
            this.Property(t => t.HideConfidential).HasColumnName("HideConfidential");
            this.Property(t => t.SeeOwnOnly).HasColumnName("SeeOwnOnly");
            this.Property(t => t.NoteHeight).HasColumnName("NoteHeight");
            this.Property(t => t.ShowSubject).HasColumnName("ShowSubject");
            this.Property(t => t.FontSize).HasColumnName("FontSize");
            this.Property(t => t.ShowTask).HasColumnName("ShowTask");
            this.Property(t => t.ShowFromTo).HasColumnName("ShowFromTo");
        }
    }
}
